package net.freestu.sola.web.global;

/**
 * @author 秋刀鱼的滋味
 *
 */
public class PageCounter {
	
	 
	private int pagenum;		
	private String name;
	
	
	public PageCounter(String name){
		
		pagenum=1;
		this.name=name;
	}
	
	public synchronized void addOne(){//这个地方有效率缺点。
		
		pagenum++;
	}
	
	public synchronized void subtractOne(){
		
		pagenum--;
	}
	
	public int getPageNum(){
		
		return pagenum;
	}

 }